<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
				"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:fn="http://java.sun.com/jsp/jstl/functions">

<h:head>

	<h:outputStylesheet library="css" name="menu-style.css" />

</h:head>

<h:body>

	<h:form>

		<div id="menu">

			<table>
				<tr>
					<td>
						<h:commandLink action="user_daily_program"
							styleClass="user_program">
							<h:graphicImage value="#{resource['images:cinema-logo.png']}"
								height="65" />
						</h:commandLink>
					</td>
					<h:panelGroup rendered="#{fn:startsWith(util.getRole(), 'admin')}">
						<td>
							<h:commandLink action="admin" title="Админ"
								styleClass="admin">
								<h:graphicImage styleClass="admin_icon"
									value="#{resource['images:admin-icon.png']}" height="25" />
								<h:outputText value="Админ" />
							</h:commandLink>
						</td>
					</h:panelGroup>
					<td>
						<h:commandLink action="user_daily_program" title="Програма"
							styleClass="user_program">
							<h:graphicImage styleClass="user_program_icon"
								value="#{resource['images:program-icon.png']}" height="25" />
							<h:outputText value="Програма" />
						</h:commandLink>
					</td>
					<td>
						<h:commandLink action="#{util.ticketsInfo()}" title="Резервации"
							styleClass="user_tickets">
							<h:graphicImage styleClass="user_tickets_icon"
								value="#{resource['images:info-icon.png']}" height="25" />
							<h:outputText value="Резервации" />
						</h:commandLink>
					</td>
					<h:panelGroup rendered="#{not empty util.getRole()}">
						<td>
							<h:commandLink action="staff" title="Добави"
								styleClass="user_add">
								<h:graphicImage styleClass="user_add_icon"
									value="#{resource['images:add-icon.png']}" height="25" />
								<h:outputText value="Добави" />
							</h:commandLink>
						</td>
					</h:panelGroup>
					<td>
						<h:commandLink action="changePass" title="Смяна на парола"
							styleClass="user_change_password">
							<h:graphicImage styleClass="user_change_password_icon"
								value="#{resource['images:change-pass-icon.png']}" height="25" />
							<h:outputText value="Смяна на парола" />
						</h:commandLink>
					</td>
					<td>
						<h:commandLink action="#{loginBean.logout}" title="Изход"
							styleClass="user_exit">
							<h:graphicImage styleClass="user_exit_icon"
								value="#{resource['images:exit-icon.png']}" height="25" />
							<h:outputText value="Изход" />
							<h:outputText value=" (#{util.getUsername()})"
								styleClass="user_name" />
						</h:commandLink>
					</td>
				</tr>
			</table>

		</div>

	</h:form>

</h:body>

</html>
